﻿using System;

/* 输入半径求圆的周长和面积 */
namespace Practice7
{
    public class Practice
    {
        const double PI = Math.PI;

        static double GetCircumference(double radius)
        {
            double circumferenc = Math.Round(PI * radius * 2, 2);
            return circumferenc;
        }

        static double GetArea(double radius)
        {
            double area = Math.Round(Math.Pow(radius, 2) * PI, 2);
            return area;
        }

        public static void Execute()
        {
            Console.Write("请输入圆的半径: ");
            double radius = double.Parse(Console.ReadLine());
            double circumferenc = GetCircumference(radius);
            double area = GetArea(radius);
            Console.WriteLine($"res: 周长={circumferenc} 面积={area}");
        }
    }
}